<?php

/**
 * Treaties
 * 论著
 *
 * @author ddj
 */
class Treaties {
    private $name;      // 
    private $source;    // 来源
    private $author;    // 作者
    private $year;      // 年份
    private $auditingState; // 审核状态
    
    function __construct($attributesArray=null) {
        $this->name = null;
        $this->source = null;
        $this->author = null;
        $this->year = null;
        $this->auditingState = null;
        
        if($attributesArray!=null){
            foreach ($attributesArray as $key => $value) {
                $this->$key = $value;
            }
        }
    }
    
    function __get($propertyName) {
        if(isset($this->$propertyName)){
            return $this->$propertyName;
        }else{
            //
            return NULL;
        }
    }
    
    function __set($propertyName, $value) {
        $this->$propertyName = trim($value);
    }
    
}
